<?php
/**
 * Created by PhpStorm.
 * User: yhb
 * Date: 2019/3/4
 * Time: 9:28
 */

namespace app\admin\model;


use think\Model;
use think\Db;

class Admin extends Common
{
    protected $table = "admin";
    public function pageData($where=[]){
        $username=isset($where['username'])?$where['username']:'';
        $status=isset($where['status'])?$where['status']:-1;
        return Db::name($this->table)->where($where)->paginate(5,false,['query'=>['username'=>$username,'status'=>$status]]);
    }

}
